<?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\widgets\Pjax;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\ShopSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '店铺名称';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="shop-index">
    

    <p>
        <?= Html::a('店铺添加', ['create'], ['class' => 'btn btn-success']) ?>
    </p>

    <?php Pjax::begin(); ?>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],
            'shop_name',
            'settled_time:date',
            'check_status',
            ['attribute'=>'shop_image',  //我的图片字段是file,还有一种显示方法为‘file:image’ ,但是图片大小不能控制。
                'format' => ['image',['width'=>'150','height'=>'130',]],
            ],
            'shop_desc',
            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>

    <?php Pjax::end(); ?>

</div>
